package com.social.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @className: menu
 * @description: TODO 类描述
 * @author: XiaoXu
 * @date: 2022/10/30 16:09
 **/

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("menu")
@ApiModel("系统字典类")
public class Menu {
    /**
        * @Description 系统字典Id
    */
    @ApiModelProperty("系统字典id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
        * @Description 当前内容所在路径
    */
    @ApiModelProperty("内容路径")
    @NotBlank(message = "内容路径为空")
    private String path;

    /**
        * @Description 字典内容
    */
    @ApiModelProperty("内容")
    @NotBlank(message = "字典内容为空")
    private String value;
    /**
        * @Description 当前指向的父节点
    */
    @ApiModelProperty("父节点的编号")
    @NotNull(message = "父节点id为空")
    private Long father;
    /**
        * @Description 儿子节点的集合
    */
    @TableField(exist = false)
    private List<Menu> sons;
}
